home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / g_man / cat3 / OpenGL / gltexcoordpointer.z / gltexcoordpointer
Encoding:
Text File  |  2001-04-17  |  15.9 KB  |  199 lines

  1.  
  2.  
  3.  
  4. ggggllllTTTTeeeexxxxCCCCoooooooorrrrddddPPPPooooiiiinnnntttteeeerrrr((((3333GGGG))))          OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee          ggggllllTTTTeeeexxxxCCCCoooooooorrrrddddPPPPooooiiiinnnntttteeeerrrr((((3333GGGG))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      ggggllllTTTTeeeexxxxCCCCoooooooorrrrddddPPPPooooiiiinnnntttteeeerrrr - define an array of texture coordinates
  10.  
  11.  
  12. CCCC SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNN
  13.      void ggggllllTTTTeeeexxxxCCCCoooooooorrrrddddPPPPooooiiiinnnntttteeeerrrr( GLint _s_i_z_e,
  14.                              GLenum _t_y_p_e,
  15.                              GLsizei _s_t_r_i_d_e,
  16.                              const GLvoid *_p_o_i_n_t_e_r )
  17.  
  18.  
  19. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
  20.      _s_i_z_e     Specifies the number of coordinates per array element. Must be
  21.               1, 2, 3 or 4. The initial value is 4.
  22.  
  23.      _t_y_p_e     Specifies the data type of each texture coordinate.  Symbolic
  24.               constants GGGGLLLL____SSSSHHHHOOOORRRRTTTT, GGGGLLLL____IIIINNNNTTTT, GGGGLLLL____FFFFLLLLOOOOAAAATTTT, or GGGGLLLL____DDDDOOOOUUUUBBBBLLLLEEEE are accepted.
  25.               The initial value is GGGGLLLL____FFFFLLLLOOOOAAAATTTT.
  26.  
  27.      _s_t_r_i_d_e   Specifies the byte offset between consecutive array elements.
  28.               If _s_t_r_i_d_e is 0, the array elements are understood to be tightly
  29.               packed. The initial value is 0.
  30.  
  31.      _p_o_i_n_t_e_r  Specifies a pointer to the first coordinate of the first element
  32.               in the array.  The initial value is 0.
  33.  
  34. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  35.      ggggllllTTTTeeeexxxxCCCCoooooooorrrrddddPPPPooooiiiinnnntttteeeerrrr specifies the location and data format of an array of
  36.      texture coordinates to use when rendering.  _s_i_z_e specifies the number of
  37.      coordinates per element, and must be 1, 2, 3, or 4.  _t_y_p_e specifies the
  38.      data type of each texture coordinate and _s_t_r_i_d_e specifies the byte stride
  39.      from one array element to the next allowing vertexes and attributes to be
  40.      packed into a single array or stored in separate arrays.  (Single-array
  41.      storage may be more efficient on some implementations; see
  42.      ggggllllIIIInnnntttteeeerrrrlllleeeeaaaavvvveeeeddddAAAArrrrrrrraaaayyyyssss.)  When a texture coordinate array is specified,
  43.      _s_i_z_e, _t_y_p_e, _s_t_r_i_d_e, and _p_o_i_n_t_e_r are saved client-side state.
  44.  
  45.      To enable and disable the texture coordinate array, call
  46.      ggggllllEEEEnnnnaaaabbbblllleeeeCCCClllliiiieeeennnnttttSSSSttttaaaatttteeee and ggggllllDDDDiiiissssaaaabbbblllleeeeCCCClllliiiieeeennnnttttSSSSttttaaaatttteeee with the argument
  47.      GGGGLLLL____TTTTEEEEXXXXTTTTUUUURRRREEEE____CCCCOOOOOOOORRRRDDDD____AAAARRRRRRRRAAAAYYYY. If enabled, the texture coordinate array is used
  48.      when ggggllllDDDDrrrraaaawwwwAAAArrrrrrrraaaayyyyssss, ggggllllDDDDrrrraaaawwwwEEEElllleeeemmmmeeeennnnttttssss, ggggllllDDDDrrrraaaawwwwRRRRaaaannnnggggeeeeEEEElllleeeemmmmeeeennnnttttssss or ggggllllAAAArrrrrrrraaaayyyyEEEElllleeeemmmmeeeennnntttt
  49.      is called.
  50.  
  51.      Use ggggllllDDDDrrrraaaawwwwAAAArrrrrrrraaaayyyyssss to construct a sequence of primitives (all of the same
  52.      type) from prespecified vertex and vertex attribute arrays.  Use
  53.      ggggllllAAAArrrrrrrraaaayyyyEEEElllleeeemmmmeeeennnntttt to specify primitives by indexing vertexes and vertex
  54.      attributes and ggggllllDDDDrrrraaaawwwwEEEElllleeeemmmmeeeennnnttttssss to construct a sequence of primitives by
  55.      indexing vertexes and vertex attributes.
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ggggllllTTTTeeeexxxxCCCCoooooooorrrrddddPPPPooooiiiinnnntttteeeerrrr((((3333GGGG))))          OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee          ggggllllTTTTeeeexxxxCCCCoooooooorrrrddddPPPPooooiiiinnnntttteeeerrrr((((3333GGGG))))
  71.  
  72.  
  73.  
  74. NOTES
  75.      ggggllllTTTTeeeexxxxCCCCoooooooorrrrddddPPPPooooiiiinnnntttteeeerrrr is available only if the GL version is 1.1 or greater.
  76.  
  77.      The texture coordinate array is initially disabled and it won't be
  78.      accessed when ggggllllAAAArrrrrrrraaaayyyyEEEElllleeeemmmmeeeennnntttt, ggggllllDDDDrrrraaaawwwwEEEElllleeeemmmmeeeennnnttttssss, ggggllllDDDDrrrraaaawwwwRRRRaaaannnnggggeeeeEEEElllleeeemmmmeeeennnnttttssss, or
  79.      ggggllllDDDDrrrraaaawwwwAAAArrrrrrrraaaayyyyssss is called.
  80.  
  81.      Execution of ggggllllTTTTeeeexxxxCCCCoooooooorrrrddddPPPPooooiiiinnnntttteeeerrrr is not allowed between the execution of
  82.      ggggllllBBBBeeeeggggiiiinnnn and the corresponding execution of ggggllllEEEEnnnndddd, but an error may or may
  83.      not be generated. If no error is generated, the operation is undefined.
  84.  
  85.      ggggllllTTTTeeeexxxxCCCCoooooooorrrrddddPPPPooooiiiinnnntttteeeerrrr is typically implemented on the client side with no
  86.      protocol.
  87.  
  88.      The texture coordinate array parameters are client-side state and are
  89.      therefore not saved or restored by ggggllllPPPPuuuusssshhhhAAAAttttttttrrrriiiibbbb and ggggllllPPPPooooppppAAAAttttttttrrrriiiibbbb.  Use
  90.      ggggllllPPPPuuuusssshhhhCCCClllliiiieeeennnnttttAAAAttttttttrrrriiiibbbb and ggggllllPPPPooooppppCCCClllliiiieeeennnnttttAAAAttttttttrrrriiiibbbb instead.
  91.  
  92. EEEERRRRRRRROOOORRRRSSSS
  93.      GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____VVVVAAAALLLLUUUUEEEE is generated if _s_i_z_e is not 1, 2, 3, or 4.
  94.  
  95.      GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____EEEENNNNUUUUMMMM is generated if _t_y_p_e is not an accepted value.
  96.  
  97.      GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____VVVVAAAALLLLUUUUEEEE is generated if _s_t_r_i_d_e is negative.
  98.  
  99. AAAASSSSSSSSOOOOCCCCIIIIAAAATTTTEEEEDDDD GGGGEEEETTTTSSSS
  100.      ggggllllIIIIssssEEEEnnnnaaaabbbblllleeeedddd with argument GGGGLLLL____TTTTEEEEXXXXTTTTUUUURRRREEEE____CCCCOOOOOOOORRRRDDDD____AAAARRRRRRRRAAAAYYYY
  101.      ggggllllGGGGeeeetttt with argument GGGGLLLL____TTTTEEEEXXXXTTTTUUUURRRREEEE____CCCCOOOOOOOORRRRDDDD____AAAARRRRRRRRAAAAYYYY____SSSSIIIIZZZZEEEE
  102.      ggggllllGGGGeeeetttt with argument GGGGLLLL____TTTTEEEEXXXXTTTTUUUURRRREEEE____CCCCOOOOOOOORRRRDDDD____AAAARRRRRRRRAAAAYYYY____TTTTYYYYPPPPEEEE
  103.      ggggllllGGGGeeeettttPPPPooooiiiinnnntttteeeerrrrvvvv with argument GGGGLLLL____TTTTEEEEXXXXTTTTUUUURRRREEEE____CCCCOOOOOOOORRRRDDDD____AAAARRRRRRRRAAAAYYYY____PPPPOOOOIIIINNNNTTTTEEEERRRR
  104.  
  105.  
  106. MMMMAAAACCCCHHHHIIIINNNNEEEE DDDDEEEEPPPPEEEENNNNDDDDEEEENNNNCCCCIIIIEEEESSSS
  107.      On RRRReeeeaaaalllliiiittttyyyyEEEEnnnnggggiiiinnnneeee, RRRReeeeaaaalllliiiittttyyyyEEEEnnnnggggiiiinnnneeee2222, and VVVVTTTTXXXX systems, do not enable or
  108.      disable GGGGLLLL____VVVVEEEERRRRTTTTEEEEXXXX____AAAARRRRRRRRAAAAYYYY, GGGGLLLL____VVVVEEEERRRRTTTTEEEEXXXX____AAAARRRRRRRRAAAAYYYY____EEEEXXXXTTTT, GGGGLLLL____NNNNOOOORRRRMMMMAAAALLLL____AAAARRRRRRRRAAAAYYYY,
  109.      GGGGLLLL____NNNNOOOORRRRMMMMAAAALLLL____AAAARRRRRRRRAAAAYYYY____EEEEXXXXTTTT, GGGGLLLL____CCCCOOOOLLLLOOOORRRR____AAAARRRRRRRRAAAAYYYY, GGGGLLLL____CCCCOOOOLLLLOOOORRRR____AAAARRRRRRRRAAAAYYYY____EEEEXXXXTTTT,
  110.      GGGGLLLL____IIIINNNNDDDDEEEEXXXX____AAAARRRRRRRRAAAAYYYY,GGGGLLLL____IIIINNNNDDDDEEEEXXXX____AAAARRRRRRRRAAAAYYYY____EEEEXXXXTTTT, GGGGLLLL____TTTTEEEEXXXXTTTTUUUURRRREEEE____CCCCOOOOOOOORRRRDDDD____AAAARRRRRRRRAAAAYYYY,
  111.      GGGGLLLL____TTTTEEEEXXXXTTTTUUUURRRREEEE____CCCCOOOOOOOORRRRDDDD____AAAARRRRRRRRAAAAYYYY____EEEEXXXXTTTT, GGGGLLLL____EEEEDDDDGGGGEEEE____FFFFLLLLAAAAGGGG____AAAARRRRRRRRAAAAYYYY or GGGGLLLL____EEEEDDDDGGGGEEEE____FFFFLLLLAAAAGGGG____AAAARRRRRRRRAAAAYYYY____EEEEXXXXTTTT
  112.      between a call to ggggllllNNNNeeeewwwwLLLLiiiisssstttt and the corresponding call to ggggllllEEEEnnnnddddLLLLiiiisssstttt.
  113.      Instead, enable or disable before the call to ggggllllNNNNeeeewwwwLLLLiiiisssstttt.
  114.  
  115.      On IIIInnnnffffiiiinnnniiiitttteeeeRRRReeeeaaaalllliiiittttyyyy systems it is particularly important to minimize the
  116.      amount of data transferred from the application to the graphics pipe,
  117.      since the host-to-pipe bandwidth limit can cause a performance
  118.      bottleneck.  One way to reduce the amount of data transferred per vertex
  119.      is to use properly-aligned byte and short data types whenever possible.
  120.      Accordingly, the EEEEXXXXTTTT____vvvveeeerrrrtttteeeexxxx____aaaarrrrrrrraaaayyyy extension on IIIInnnnffffiiiinnnniiiitttteeeeRRRReeeeaaaalllliiiittttyyyy systems
  121.      has been optimized for vertex information packed into the following data
  122.      structures.  (Note: _v represents vertex coordinates, _c represents color
  123.      components, _n represents normal coordinates, and _t represents texture
  124.      coordinates.  Normals must have unit length.)
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. ggggllllTTTTeeeexxxxCCCCoooooooorrrrddddPPPPooooiiiinnnntttteeeerrrr((((3333GGGG))))          OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee          ggggllllTTTTeeeexxxxCCCCoooooooorrrrddddPPPPooooiiiinnnntttteeeerrrr((((3333GGGG))))
  137.  
  138.  
  139.  
  140.           struct {GLfloat v[3];}
  141.           struct {GLubyte c[4]; GLfloat v[3];}
  142.           struct {GLshort n[3]; GLfloat v[3];}
  143.           struct {GLubyte c[4]; GLshort n[3]; GLfloat v[3];}
  144.           struct {GLshort t[2]; GLfloat v[3];}
  145.           struct {GLshort t[2]; GLubyte c[4]; GLfloat v[3];}
  146.           struct {GLshort t[2]; GLshort n[3]; GLfloat v[3];}
  147.           struct {GLshort t[2]; GLubyte c[4]; GLshort n[3]; GLfloat v[3];}
  148.           struct {GLfloat t[2]; GLfloat v[3];}
  149.           struct {GLfloat t[2]; GLubyte c[4]; GLfloat v[3];}
  150.           struct {GLfloat t[2]; GLshort n[3]; GLfloat v[3];}
  151.           struct {GLfloat t[2]; GLubyte c[4]; GLshort n[3]; GLfloat v[3];}
  152.  
  153.      Application-specific fields may be added to these structures, provided
  154.      that all the fields described above retain their relative order and word
  155.      alignment.
  156.  
  157.      An additional constraint applies when ggggllllTTTTeeeexxxxGGGGeeeennnn is being used.  The
  158.      implementation normally generates all four texture coordinates in
  159.      parallel, and must take special action to generate just a subset of the
  160.      four coordinates.  Therefore performance is best when none of the texture
  161.      coordinates are being generated, or when all of them are being generated.
  162.      For example, when using 2D texturing (generating _s and _t coordinates) it
  163.      will be faster to enable texture coordinate generation for the _r and _q
  164.      coordinates as well as _s and _t.  Choose a texture generation mode of
  165.      GGGGLLLL____OOOOBBBBJJJJEEEECCCCTTTT____LLLLIIIINNNNEEEEAAAARRRR and use the plane equations (0,0,0,0) and (0,0,0,1) for
  166.      _r and _q, respectively.
  167.  
  168.      Using these structures on IIIInnnnffffiiiinnnniiiitttteeeeRRRReeeeaaaalllliiiittttyyyy systems can improve performance
  169.      considerably, compared to structures in which all values are single-
  170.      precision floating point.
  171.  
  172.  
  173. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  174.      ggggllllAAAArrrrrrrraaaayyyyEEEElllleeeemmmmeeeennnntttt, ggggllllCCCCoooolllloooorrrrPPPPooooiiiinnnntttteeeerrrr, ggggllllDDDDrrrraaaawwwwAAAArrrrrrrraaaayyyyssss, ggggllllDDDDrrrraaaawwwwEEEElllleeeemmmmeeeennnnttttssss,
  175.      ggggllllDDDDrrrraaaawwwwRRRRaaaannnnggggeeeeEEEElllleeeemmmmeeeennnnttttssss, ggggllllEEEEddddggggeeeeFFFFllllaaaaggggPPPPooooiiiinnnntttteeeerrrr, ggggllllEEEEnnnnaaaabbbblllleeee, ggggllllGGGGeeeettttPPPPooooiiiinnnntttteeeerrrrvvvv,
  176.      ggggllllIIIInnnnddddeeeexxxxPPPPooooiiiinnnntttteeeerrrr, ggggllllNNNNoooorrrrmmmmaaaallllPPPPooooiiiinnnntttteeeerrrr, ggggllllPPPPooooppppCCCClllliiiieeeennnnttttAAAAttttttttrrrriiiibbbb, ggggllllPPPPuuuusssshhhhCCCClllliiiieeeennnnttttAAAAttttttttrrrriiiibbbb,
  177.      ggggllllTTTTeeeexxxxCCCCoooooooorrrrdddd, ggggllllVVVVeeeerrrrtttteeeexxxxPPPPooooiiiinnnntttteeeerrrr
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.